//作业二LED中流水
int max = 12;
int min = 7; 
int mid = (min+max)/2;
void setup() {
  // put your setup code here, to run once:
  int temp = min;
  while(temp<=max){
    pinMode(temp,OUTPUT);
    temp++;
  }
}
void loop() {
  // put your main code here, to run repeatedly:
  for(int x=1;mid+x<=max;x++){
    if(x==1){
      digitalWrite(mid-x+1,HIGH);
      digitalWrite(min,LOW);
      digitalWrite(mid+x,HIGH);
    digitalWrite(max,LOW);
    }else{
      digitalWrite(mid-x+1,HIGH);
       digitalWrite(mid-x+2,LOW);
      digitalWrite(mid+x,HIGH);
    digitalWrite(mid+x-1,LOW);
    }
    delay(500);
  }
}
